package com.xkcoding.task.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xkcoding.task.repository.dao.DemoMapper;
import com.xkcoding.task.repository.dao.StudentZsMapper;
import com.xkcoding.task.repository.entity.DemoEntity;
import com.xkcoding.task.repository.entity.StudentZsEntity;
import com.xkcoding.task.service.DemoService;
import com.xkcoding.task.service.StudentZsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Slf4j
@Service
@Transactional(rollbackFor = Exception.class)
public class StudentZsServiceImpl extends ServiceImpl<StudentZsMapper, StudentZsEntity> implements StudentZsService {

  @Resource
  StudentZsMapper zsMapper;

  @Override
  public StudentZsEntity getStudentZsByJobNo(String jobNo) {
    QueryWrapper<StudentZsEntity> queryWrapper = new QueryWrapper<>();
    queryWrapper.lambda().eq(StudentZsEntity::get学号, jobNo);
    return zsMapper.selectOne(queryWrapper);
  }
}
